# testblogservice.py
# Original Author: Amar Zumkhawala (amarzumkhawala@gmail.com)
# Project URL - http://code.google.com/p/feedflare-categories
# Distributed under Apache License 2.0
#
# $Revision: 10 $, $Date: 2008-12-31 05:48:13 +0000 (Wed, 31 Dec 2008) $
# $Author: amarzumkhawala $

from blogservice import AbstractBlogService, BlogEntry

#######
#
# Test implementation.
#
#######
class TestBlogService(AbstractBlogService):
  def __init__(self):
    self._blogEntry = BlogEntry()
    self._blogEntry.setAtomId("123abc")
    self._atomEntryXml = "<?xml version=\"1.0\"?><entry><category term=\"t1\" /><category term=\"t2\" /><link rel=\"alternate\" href=\"http://www.test.com/foo.html\"/><id>123abc</id></entry>"
    self._blogSearchByCategoryUrl = "http://www.test.com/search/t1"
  def fetchBlogXml(self,blogEntry):
    return self._atomEntryXml
  def getBlogSearchByCategoryUrl(self,atomEntryParser):
    return self._blogSearchByCategoryUrl
  def blogEntry(self):
    return self._blogEntry
